package com.itheima.a01mybytestream;

import java.io.FileInputStream;
import java.io.IOException;

public class FileInputStreamDemo2 {
    public static void main(String[] args) throws IOException {
        //循环读取文件内容
        //创建对象
        FileInputStream fis = new FileInputStream("myio\\a.txt");
        //读取
        int i;
        while ((i = fis.read()) != -1) {
            //没有读到末尾
            System.out.print((char) i);
        }
        //释放内存
        fis.close();
    }
}
